package com.ruoyi.common.core.enums;

import java.util.*;

/**
 * 报名系统 指定联赛id
 */
public enum BMIndexEnum {

    ONE(1, Arrays.asList(
//            58L,
            //东莞赛区
            180L,181L,182L,183L,184L,
            //佛山赛区
            188L,189L,190L,191L,192L,
            //广州赛区
            196L,197L,198L,199L,200L,
            //惠州赛区
            185L,186L,193L,194L,201L
    )),
    TWO(2, Arrays.asList(
            225L,
            226L,227L,228L,229L,230L,
            231L,232L,233L,234L,235L,
            236L,237L,238L,239L,240L,
            241L,242L,243L,244L,245L,
            246L,247L,248L,249L,250L,
            251L,252L
    ))
    ;


    private final int code;
    private final List<Long> contest;

    BMIndexEnum( int code,List<Long> contest ) {
        this.code = code;
        this.contest = contest;
    }

    public int getCode() {
        return code;
    }

    public List<Long> getContest() {
        return contest;
    }

    public static List<Long> getValue(Integer key) {
        for (BMIndexEnum typeEnum : BMIndexEnum.values()) {
            if (Objects.equals(typeEnum.getCode(), key)) {
                return typeEnum.getContest();
            }
        }
        return BMIndexEnum.ONE.getContest();
    }
}
